<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="com.fredck.FCKeditor.*,com.gouwudai.gobbs.pojo.TbbsUserInfo,com.gouwudai.gobbs.pojo.TbbsUserDetail"%>
<%@ include file="../common/common.jsp" %>
<%@ include file="user_pass2.jsp" %>
<%
int userId = userLogin.getUserId();

IUserService userService = (IUserService)BeanManager.getBean("userService");
TbbsUserInfo tbbsUserInfo = userService.load(userId);
TbbsUserDetail tbbsUserDetail = userService.loadDetail(userId);
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=SYSTITLE%> - 修改注册资料</title>
<meta name="Keywords" content="<%=SYSMETAKEY%>" />
<meta name="Description" content="<%=SYSMETADESC%>" />
<%@ include file="../common/meta.inc" %>
<%@ include file="/calendar/calendar.jsp" %>
<STYLE type="text/css" media="screen">
@import url(css/defaultStyle.css);
</STYLE>
</head>
<body>
<%@ include file="../common/waiting.inc" %>
<script language="javascript" type="text/javascript" src="template/scripts/topBar.js"></script>
<script language="javascript" type="text/javascript" src="scripts/userReg.js"></script>
<script language="javascript" type="text/javascript" src="${pageContext.request.contextPath}/scripts/common-validator.js"></script>
<script language="javascript" src="${pageContext.request.contextPath}/scripts/prototype.js"></script>
<script language="javascript" src="${pageContext.request.contextPath}/scripts/buffalo/buffalo.js"></script>
<script language="javascript" type="text/javascript">

setStatus('<%=SYSTITLE%> - 修改注册资料');

var END_POINT="${pageContext.request.contextPath}/buffalo";
var buffalo = new Buffalo(END_POINT);

var userId = <%=userId%>;
var opIp="<%=LOGIN_IP%>";
</script>
<DIV class="line"></DIV>
<DIV class="list_table_0">
<%=HtmlConst.navMenu("修改注册资料")%>
</DIV>
<DIV class="line"></DIV>
<form action="" method="post"  name="theform">
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
<tr>
	<td width="120" class="tab1">
	<strong>用户名</strong>
	</td>
	<td class="bg2"><input name="loginId" type="text" id="loginId" value="<%=tbbsUserInfo.getLoginId() %>" readonly size="30" maxlength="50" /></td>
</tr>
<tr>
	<td class="tab1"><strong>新密码</strong></td>
	<td class="bg2">
	  <table width="100%"  border="0" cellpadding="0" cellspacing="0">
        <tr>
        <td width="100"><input onKeyUp="rateUserPass(this)" name="password" type="password" id="password" size="30" maxlength="50" /></td>
        <td width="10"></td><td>
		<TABLE width="200" border=0 cellPadding=0 cellSpacing=0 >
			<TBODY><TR><TD vAlign=top noWrap width=0>
			<A href="#" onclick="return false;">密码强度参考</A> 
			</TD>
			<TD><DIV id="passwdRating">未评级</DIV>
			</TD></TR><TR><TD height=3></TD></TR>
			<TR><TD colSpan=2>
			<TABLE  id="passwdBarDiv" cellSpacing=0 cellPadding=0 width="200"  bgColor="#ffffff" border=0>
			<TBODY><TR>
			<TD id="posBar" width="0%" bgColor="#e0e0e0" height="4"></TD>
			<TD id="negBar" width="100%" bgColor="#e0e0e0"  height="4"></TD>
			</TR></TBODY>
			</TABLE>
			</TD></TR>
		</TBODY></TABLE></td>
    </tr>
    </table>
</td>
</tr>
<tr>
	<td class="tab1"><strong>确认密码</strong></td>
	<td class="bg2">
	<input name="password2" type="password" id=""password2"" size="30" maxlength="50" />（同上）
	</td>
</tr>
<tr>
	<td width="120" class="tab1"><strong>用户昵称</strong></td>
	<td class="bg2"><input name="userName" type="text" id="userName" value="<%=tbbsUserInfo.getUserName() %>" size="30" maxlength="50" /></td>
</tr>
<tr>
	<td class="tab1"><strong>性别</strong></td>
	<td class="bg2">
	<input name="sex" type="radio" value="M" <%=Arguments.getRadioStatus(tbbsUserInfo.getSex(),"M") %>/>男
	&nbsp;&nbsp;
	<input type="radio" name="sex" value="F" <%=Arguments.getRadioStatus(tbbsUserInfo.getSex(),"F") %>/>女
	&nbsp;&nbsp;
	<input type="radio" name="sex" value="O" <%=Arguments.getRadioStatus(tbbsUserInfo.getSex(),"O") %>/>保密
	</td>
</tr>
<tr>
	<td class="tab1"><strong>电子邮件(Email)</strong></td>
	<td class="bg2"><input name="email" type="text" id="email" value="<%=tbbsUserInfo.getEmail()%>" size="30" maxlength="50" onblur="checkEmail(<%=userId %>,this);" /><div id="checkEmail" class="warning" ></div>
	</td>
</tr>
<tr>
<td class="tab1"><strong>邮件是否公开</strong></td>
	<td class="bg2">
	<select name="emailOpenFlag" id="emailOpenFlag">	
		<%=Arguments.getEmailOpenFlagOptions(tbbsUserInfo.getEmailOpenFlag())%>
	</select>
	</td>
</tr>
<tr>
	<td class="tab1"><strong>个人签名</strong></td>
	<td class="bg2">
	  <%
FCKeditor oFCKeditor ;
oFCKeditor = new FCKeditor( request, "personalSign" ) ;
oFCKeditor.setBasePath( contextPath+"/fckeditor/" ) ;
oFCKeditor.setValue(tbbsUserInfo.getPersonalSign());
oFCKeditor.setHeight("200");
FCKeditorConfigurations fckConfig = oFCKeditor.getConfig();
fckConfig.put("LinkBrowser","true");//超链浏览
fckConfig.put("ImageBrowser","true");//图片浏览
fckConfig.put("FlashBrowser","true");//FLASH浏览
fckConfig.put("LinkUpload","true");//文件上传
fckConfig.put("ImageUpload","true");//图片上传
fckConfig.put("FlashUpload","true");//FLASH上传
oFCKeditor.setConfig(fckConfig);
out.println( oFCKeditor.create() ) ;
%>	 
<br/>发帖可跟随在帖子底部
	</td>
</tr>
<tr>
	<td class="tab1"><strong>自我介绍</strong></td>
	<td class="bg2">
	<textarea name="personalIntro" cols="110" rows="8" id="personalIntro"><%=tbbsUserInfo.getPersonalIntro()%></textarea><br />让朋友们更加了解你
	</td>
</tr>
<tr>
	<td class="tab1">&nbsp;</td>
	<td height="30" class="bg2">
	<input id="checkExtra" name="checkExtra" type=checkbox value="1" onclick="showExtra(this);">
	<span id=divTxt>高级设置选项</span>	
	<input type="button" name="btnSubmit" value="确定" class="btn" onclick="javascript:doUpdateSubmit();">
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="button" name="btnBack" value="取消" class="btn" onClick="javascript:history.back();"/>
	</td>
</tr>
</table>
<div id="extraProp" style="display:none">
	<table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
	<tr>
		<td width="120" class="tab1"><strong>真实姓名</strong></td>
		<td class="bg2"><input name="trueName" type="text" id="trueName" value="<%=Utility.trimNull(tbbsUserInfo.getTrueName())%>" size="30" maxlength="50" /></td>
	</tr>
	<tr>
		<td class="tab1"><strong>生日</strong></td>
		<td class="bg2"><input type="text" name="birthday" id="birthday" value="<%=FormatDateTime.formatIntegerDate(tbbsUserDetail.getBirthday())%>">
	                    <img id="calButton" src="<c:url value="/calendar/skins/aqua/cal.gif"/>" border="0" alt="选择日期" style="cursor: pointer;">
	                    <script type="text/javascript">
	                        new calendar("birthday", "calButton", "%Y-%m-%d");
	                    </script>
		</td>
	</tr>
	<tr>
		<td class="tab1"><strong>手机号</strong></td>
		<td class="bg2">
		<input name="mobile" type="text" id="mobile"  value="<%=Utility.trimNull(tbbsUserDetail.getMobile())%>" size="15" maxlength="16" />
		</td>
	</tr>
	<tr>
		<td class="tab1"><strong>联系电话</strong></td>
		<td class="bg2">
		<input name="telephone" type="text" id="telephone"  value="<%=Utility.trimNull(tbbsUserDetail.getTelephone())%>" size="15" maxlength="16" />
		</td>
	</tr>
	<tr>
		<td class="tab1"><strong>联系地址</strong></td>
		<td class="bg2">
		<input name="address" type="text" id="address"  value="<%=Utility.trimNull(tbbsUserDetail.getAddress())%>" size="15" maxlength="16" />&nbsp;
		<strong>邮编</strong>&nbsp;<input name="postNo" type="text" id="postNo"  value="<%=Utility.trimNull(tbbsUserDetail.getPostNo())%>" size="6" maxlength="6" />
		</td>
	</tr>
	<tr>
		<td class="tab1"><strong>QQ</strong></td>
		<td class="bg2"><input name="qq" type="text" id="qq"  value="<%=Utility.trimNull(tbbsUserDetail.getQq())%>"  size="20" maxlength="50" /></td>
	</tr>
	<tr>
		<td class="tab1"><strong>MSN</strong></td>
		<td class="bg2"><input name="msn" type="text" id="msn"  value="<%=Utility.trimNull(tbbsUserDetail.getMsn())%>" size="20" maxlength="100" /></td>
	</tr>
	
	<tr>
		<td class="tab1"><strong>个人主页</strong></td>
		<td class="bg2"><input name="personalWeb" type="text" id="personalWeb"  value="<%=Utility.trimNull(tbbsUserDetail.getPersonalWeb())%>" size="30" maxlength="200" /></td>
	</tr>
	<tr>
		<td class="tab1"><strong>所在地区</strong></td>
		<td colspan="2" class="bg2">
		<input  name="area" type="text" id="area" value="<%=Utility.trimNull(tbbsUserDetail.getArea())%>" size="15" maxlength="50" />
		<select name="areaId" id="areaId" onchange="changeAreaName(this);">				
			<%=Arguments.getProvinceOptions(0) %>
		</select>
		<div id="cityOptions" class="warning" style="display:none">
		<select name="cities" id="cities" onchange="changeCity(this);">
			<option value="" >请选择</option>
		</select>
		</div>
		</td>
	</tr>
	<tr>
		<td class="tab1"><strong>所在城市</strong></td>
		<td class="bg2">
		<input name="city" type="text" id="city"  value="<%=Utility.trimNull(tbbsUserDetail.getCity())%>" size="15" maxlength="50" />	
		</td>
	</tr>
	<tr>
		<td class="tab1"><strong>职业</strong></td>
		<td class="bg2">
		<input name="job" type="text" id="job"  value="<%=Utility.trimNull(tbbsUserDetail.getJob())%>" size="15" maxlength="16" />
		</td>
	</tr>
	</table>
</div>
</form>
<%=COPYRIGHTFOOT%>
<%@ include file="../common/foot.inc"%>
</body>
</html>
